#ifndef _MODULE_VISION_H_
#define _MODULE_VISION_H_
#ifdef __cplusplus
 extern "C" {
#endif
#include "includes.h"	
#include "Tool_PID.h"
	 
#ifdef _MODULE_VISION_GLOBALS
#define _MODULE_VISION_EXT    
#else 
#define _MODULE_VISION_EXT  extern
#endif	 

#define ToCVStructPointer(_ptemp)  ((CVStruct*)_ptemp)	 

_MODULE_VISION_EXT PID AlignSpeedPID_X;
_MODULE_VISION_EXT PID AlignSpeedPID_Y;


typedef __packed struct//16Bytes
{
	int64_t CRC_Check;// 8Bytes
	int8_t ID;//1Bytes
	int8_t Flag;//1Bytes
  short Distance;//2Bytes
	float Theta;//4Bytes
	//int16_t RES;
}MyCVStruct;

//void CV_ToPC(CVStruct *pMsg);
//void CV_FromPC(CanRxMsg *pMsg);	 
void CV_Pack_Handle(MyCVStruct *ptrmsg);

void Auto_Align_PID_Config(void);
void Auto_PID_SetCurrent(void);
void Auto_PID_SetTarget(void);
void Auto_Align_Adjust_PID(void);


#ifdef __cplusplus
      }
#endif
#endif
